package com.hjc.springbootmovies.service.Impl;

import com.hjc.springbootmovies.entity.ModelSale;
import com.hjc.springbootmovies.mapper.MappingSale;
import com.hjc.springbootmovies.service.SaleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: HJC
 * Date: 2019/12/6
 * Time: 10:30
 * To change this template use File | Settings | File Templates.
 */
@Service
public class SaleServiceImpl implements SaleService {
    @Autowired
    private MappingSale mappingSale;
    @Override
    public List<ModelSale> querySale() {
        return mappingSale.querySale();
    }

    @Override
    public int addSale(int fid, int tid, int mzw) {
        return mappingSale.addSale(fid, tid, mzw);
    }

    @Override
    public int deleteById(int mid) {
        return mappingSale.deleteById(mid);
    }

    @Override
    public List<ModelSale> queryById2(Integer xid) {
        return mappingSale.queryById2(xid);
    }

    @Override
    public List<ModelSale> queryMzw(int tid, int fid) {
        return mappingSale.queryMzw(tid, fid);
    }
}
